<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>时间动态显示</title>
		<script type="text/javascript">
			function atime(){
				var now=new Date();
				var ye=now.getFullYear();
				var mo=now.getMonth()+1;
				var day=now.getDate();
				var dat=now.getDay();
				var hh=now.getHours();
				var mm=now.getMinutes();
				var ss=now.getSeconds();
				document.getElementById("cl").innerHTML="现在是："+ye+"年"+mo+"月"+day+"日,星期："+dat+"*-|时间为："+hh+":"+mm+":"+ss;
			}
			
		var nowtime=setInterval("atime()",1000);
		</script>
	</head>
	<body>
		<div id="cl"></div>
	</body>
</html>
